#!/bin/bash
rpm -qc vsftpd &>/dev/null
if [ $? -ne 0 ]
then
    echo "No vsftpd server"
    echo "wait 2 second install vsftpd"
sleep 2
    while :
    do
        yum -y install vsftpd &>/dev/null
        if [ $? -eq 0 ]
        then
            echo "vsftpd install successful" && break
        fi
    done
else
    echo "Has vsftpd server"
fi
